<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateLancamentoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateLancamentoLabel_idlancamento}" for="idlancamento" />
                    <h:inputText id="idlancamento" value="#{lancamentoController.selected.idlancamento}" title="#{bundle.CreateLancamentoTitle_idlancamento}" required="true" requiredMessage="#{bundle.CreateLancamentoRequiredMessage_idlancamento}"/>
                    <h:outputLabel value="#{bundle.CreateLancamentoLabel_idprojeto}" for="idprojeto" />
                    <h:inputText id="idprojeto" value="#{lancamentoController.selected.idprojeto}" title="#{bundle.CreateLancamentoTitle_idprojeto}" required="true" requiredMessage="#{bundle.CreateLancamentoRequiredMessage_idprojeto}"/>
                    <h:outputLabel value="#{bundle.CreateLancamentoLabel_valor}" for="valor" />
                    <h:inputText id="valor" value="#{lancamentoController.selected.valor}" title="#{bundle.CreateLancamentoTitle_valor}" />
                    <h:outputLabel value="#{bundle.CreateLancamentoLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{lancamentoController.selected.descricao}" title="#{bundle.CreateLancamentoTitle_descricao}" />
                    <h:outputLabel value="#{bundle.CreateLancamentoLabel_debcred}" for="debcred" />
                    <h:inputText id="debcred" value="#{lancamentoController.selected.debcred}" title="#{bundle.CreateLancamentoTitle_debcred}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{lancamentoController.create}" value="#{bundle.CreateLancamentoSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{lancamentoController.prepareList}" value="#{bundle.CreateLancamentoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateLancamentoIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
